/**
 * @file	user_data.h
 * @author	chipsea
 * @brief	
 * @version	0.1
 * @date	2020-11-30
 * @copyright Copyright (c) 2020, CHIPSEA Co., Ltd.
 * @note
 */
#ifndef __USER_DATA_H__
#define __USER_DATA_H__

#include "types.h"


#ifdef __cplusplus
extern "C"
{
#endif

#define	BAUD_FLASH_ADDR1		0x50000
#define	BAUD_FLASH_ADDR2		0x51000

/**
 * @brief user_data_t
 * 
 */
#pragma pack (1)
typedef struct {
	uint16 flg;
	uint32 index;
	uint8  baud;
    uint8  advin;
    uint8  connin;
    uint8  power;
    uint8  name[26];
    uint8  mac[6];
	uint8  check_sum;
} user_data_t;
#pragma pack ()

extern user_data_t user_data;

/*********************************************************************
 * FUNCTIONS
 */
void user_data_init(void);
void user_data_save(void);

/*********************************************************************
*********************************************************************/

#ifdef __cplusplus
}
#endif

#endif /* USER_DATA_H */
